package com.iflytek.uoamp.agent.monitor.utils.ValidIP;

import java.util.Properties;

public class ValidIP {

	ValidIPInterface validIPInstance = null;
	public ValidIP(String ip) {
		Properties props = System.getProperties();
		String osName = props.getProperty("os.name");
		if (osName.toLowerCase().contains("windows")) {
			validIPInstance = new WinValidIP(ip);
		} else {
			validIPInstance = new LinuxValidIP(ip);
		}
	}
	
	public boolean isOK() {
		return validIPInstance.isOK();
	}
	
	public String guessIP() {
		return validIPInstance.guessIP();
	}
}
